<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="css/base.css?v=20140102" rel="stylesheet" type="text/css" />
<title></title>
</head>
<style>
.tab  td{ border:0px solid #999;border-bottom:1px solid #999; }
.tab {
	width:100%;
	border-spacing:20px;
	font-size:20px;
	background-color:#FFFFFF;
	}
</style>
<body>
<div class="viewport" id="main_content"/>

<script type="text/javascript" src="js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="js/handlebars-v1.2.0.js"></script>
 
<script id="entry-template1" type="text/x-handlebars-template">

  <table class="tab">
    <tr>
    	<td  align="right" nowrap="nowrap" width="40%">
        	<b>商品名称:</b>
        </td>
        <td align="left" width="60%">
        	{{GoodsName}}
        </td>
    </tr>
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>商品代码:</b>
        </td>
        <td  align="left" width="60%">
        	{{GoodsCode}}
        </td>
    </tr>
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>商品规格:</b>
        </td>
        <td align="left"  width="60%">
        	{{GoodsSpec}}
        </td>
    </tr>
</table>
<div class="tab"><b>&nbsp;&nbsp;&nbsp;&nbsp;各个卖场价格如下:</b></div>
<table class="tab">
	{{#each PriceList}}
    <tr>
    	<td  align="right" nowrap="nowrap" width="40%">
        	<b>{{ShopName}}:</b>
        </td>
        <td align="left" width="60%">
        	{{Price}}
        </td>
    </tr>
	{{/each}}  
</table>


</script>



<script id="entry-template" type="text/x-handlebars-template">

  <table class="tab">
    <tr>
    	<td  align="right" nowrap="nowrap" width="40%">
        	<b>部门代码:</b>
        </td>
        <td align="left" width="60%">
        	{{DeptId}}
        </td>
    </tr>
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>部门名称:</b>
        </td>
        <td  align="left" width="60%">
        	{{DeptName}}
        </td>
    </tr>
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>商品代码:</b>
        </td>
        <td align="left"  width="60%">
        	{{GoodsCode}}
        </td>
    </tr>
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>商品名称:</b>
        </td>
        <td align="left"  width="60%">
        	{{GoodsName}}
        </td>
    </tr>
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>商品规格:</b>
        </td>
        <td align="left"  width="60%">
        	{{GoodsSpec}}
        </td>
    </tr>
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>零售单价:</b>
        </td>
        <td align="left"  width="60%">
        	{{Price}}
        </td>
    </tr>
    <tr>
    	<td align="right" nowrap="nowrap" width="40%">
        	<b>会员价:</b>
        </td>
        <td align="left"  width="60%">
        	{{VipPrice}}
        </td>
    </tr>
</table>
<div class="tab"><b>&nbsp;&nbsp;&nbsp;&nbsp;各个卖场价格如下:</b></div>
<table class="tab">
	{{#each PriceList}}
    <tr>
    	<td  align="right" nowrap="nowrap" width="40%">
        	<b>{{ShopName}}:</b>
        </td>
        <td align="left" width="60%">
        	{{Price}}
        </td>
    </tr>
	{{/each}}  
</table>


</script>

<script type="text/javascript">
	   var source=$("#entry-template").html();
       var template = Handlebars.compile(source);
	   eval( 'var context=' + window.android.getjson() );
	   //var context ={"GoodsCode":"539390","GoodsName":"帮登小童鞋","GoodsSpec":"572B04","PriceList":[{"ShopName":"北苑店","Price":1000},{"ShopName":"天通苑店","Price":1300}],"Result":"1","Message":""}; 
	   if (context.Result==0){
		   	alert( context.Message );
	   }
	   else{
		   var html = template( context );
   	       $("#main_content").html( html );
	   }
       </script>

</body>
</html>
